{% extends "base.html" %}

{% block body %}
<p><a href="/admin/new_contest">Create new contest</a></p>
<p><a href="/admin/review">Review entries</a></p>

  {% for contest in contests %}
    <div class="contest {{ contest.IsCompleted|yesno:"completed," }}">
    <fieldset>
    <legend>{{contest.name}}</legend>
      <img src='/contestimage/{{contest.image.key.id}}' class="thumbnailImage">
      Creator: {{contest.creator}}
      <p>
      Description: {{contest.description}}
      <br/>Start time: {{contest.start_time|DisplayDate}}
      <br/>End time: {{contest.end_time|DisplayDate}}
      <p>
      <a href='/contest/{{contest.key.id}}'>view</a> --
      <a href='/admin/edit/{{contest.key.id}}'>edit</a>
      <p class="notice">
      {% if contest.disabled %}
      <br/>Disabled
      {% endif %}
      {% if contest.IsCompleted %}
      <br/>Completed
      {% endif %}
    </fieldset>
    </div>
  {% endfor %}

{% endblock %}
